<?php $this->load->view('qt/header',null,false,true); ?>

<?php if(!isset($_REQUEST["timeline"])){?>
<!--  PAPER WRAP -->
<div class="wrap-fluid">
    <div class="container-fluid paper-wrap bevel tlbr">

        <!-- CONTENT -->
        <!--TITLE -->
        <div class="row">
            <div id="paper-top">
                <div class="col-sm-12">
                    <h2 class="tittle-content-header">
                        <i class="qt-network"></i>
                        <span id="title-header">
                            <?php echo (isset($this->title_header)) ? $this->title_header : 'CHI TIẾT KHÁCH HÀNG';?>
                        </span>
                    </h2>
                </div>
            </div>
        </div>
        <!--/ TITLE -->
        <ul id="breadcrumb">
            <li><span class="entypo-home"></span></li>
            <li><i class="fa fa-lg fa-angle-right"></i></li>
            <li><a href="#main">Trang chủ</a></li>
        </ul>
        <div class="content-wrap">

<section class="vbox">
	<section class="scrollable padder">
		<div class="row">
			<section class="panel panel-info"  style="padding-top: 20px;">
				<?php } ?>
				<div class="panel-body" style="padding-top: 0px !important">
					<input type="hidden" value="<?php if(isset($_REQUEST["timeline"])){ echo 1; }else{ echo 0; }?>" name="timeline" class="timeline">
					<form class="form-horizontal" method="post" action="">
						<div class="form-group text-center">
							<div style="display:none;"> 
								<label style="text-transform: uppercase; font-size: 16px; font-weight: normal;" >Loại khách hàng</label>
							</div>
							<div class="btn-group" data-toggle="buttons">
                            
								<label class="q-canhan" onClick="$('.company-form').hide();$('.customer-form').show();">
									Cá nhân
								</label>
                                
								<label class="q-congty" onClick="$('.company-form').show();$('.customer-form').hide();">
									 Doanh nghiệp
								</label>
                                
							</div>
						</div>
					</form>
					<div class="company-form" style="display:none; margin-top: 10px;">
                    <section class="panel panel-default" style="position: relative;  border: 1px solid black;">
						<header class="panel-heading font-bold"
                                    style="background: black;
                                           color: #ff6700;
                                           font-size: 17px;
                                           text-align: center;
                                           font-weight: normal;
                                           width: 60%;
                                           height: 30px;
                                           position: absolute;
                                           left: 20%;
                                           top: -15px;
                                           padding-top: 6px;">Khách hàng doanh nghiệp</header>
                    <div class="panel-body" style=" border: 1px solid black; padding-top: 20px;">
					<div class="col-md-6"> 
							<section class="panel panel-default">
								<header class="panel-heading font-bold" style="background: #bcbcbc; height: 30px; font-size: 16px; padding: 5px;">
                                <li class="qt-user" style="list-style: none; float: left;">&nbsp;</li>
                                Thông tin người đại diện</header>
								<div class="body-nest" style="border: 1px solid #bcbcbc; border-top: none;">
									<form role="form" class="form-horizontal">
											<div class="form-group"  style="margin-top: 10px !important;"> 
												<div class="col-xs-6">
													<div class="col-lg-12"  style="padding:0px;" >
														<select   class="cust_sex form-control qtLe" name="cust_sex">
															<option value="Mr">Mr.</option>
															<option value="Ms">Ms.</option>
														</select>
                                                        <li class="qt-mr" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
													</div>											
												</div>			
												
											</div>
											<div class="form-group" style="margin-top: 10px !important;"> 


												<div class="col-xs-6"> 
													<div class="col-lg-12"  style="padding:0px;" >
                                                    <input type="text" class="form-control qtLe qtLe" placeholder="Họ khách hàng" name="cust_first_name">
                                                    <li class="qt-sao" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div> 
												</div>
												<div class="col-xs-6"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <input type="text" class="form-control qtLe" placeholder="Tên khách hàng" name="cust_last_name">
                                                    <li class="qt-sao1" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div>
												</div>
											</div>

											<div class="form-group" style="margin-top: 10px !important;"> 


												<div class="col-xs-6"> 
													<div class="col-lg-12" style="padding:0px;">
                                                    <input type="text" readonly="true" class="form-control qtLe datepicker-input" placeholder="Ngày tháng năm sinh" name="cust_dob" data-date-format="dd-mm-yyyy">
                                                    <li class="qt-time1" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div>
												</div>
												<div class="col-xs-6"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <input  type="text" class="form-control qtLe" placeholder="Số điện thoại" name="cust_phone">
                                                    <li class="qt-phone" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div> 
												</div>
											</div>
											<div class="form-group"  style="margin-top: 10px !important;"> 
												<div class="col-xs-12"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <input type="text" class="form-control qtLe" placeholder="Địa chỉ" name="cust_address">
                                                    <li class="qt-mp" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div> 
												</div>

											</div>
											<div class="form-group" style="margin-top: 10px !important;"> 
												<div class="col-xs-6"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <input type="text" class="form-control qtLe" placeholder="Mã số thuế cá nhân" name="cust_tax_code">
                                                    <li class="qt-ms" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div> 
												</div>
												<div class="col-xs-6"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <input type="text" class="form-control qtLe" placeholder="Email" name="cust_email">
                                                    <li class="qt-email" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div> 
												</div>
											</div>

											<div class="form-group"  style="margin-top: 10px !important;"> 
												<div class="col-xs-6"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <input type="text" class="form-control qtLe" placeholder="CMND" name="cust_cmnd">
                                                    <li class="qt-cmnd" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div> 
												</div>
												<div class="col-xs-6"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <input type="text" readonly="true" class="form-control qtLe  datepicker-input" placeholder="Ngày cấp cmnd" name="cust_cmnd_date" data-date-format="dd-mm-yyyy">
                                                    <li class="qt-time1" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div> 
												</div>
											</div>
											<div class="form-group"  style="margin-top: 10px !important;"> 
											<!--
												<div class="col-xs-6"> 
												<label class="col-lg-12">Ngành hàng:</label> 
												<div class="col-lg-12">
													<select multiple="" style="height: 75px" class="form-control qtLe" name="finance_lines">
														<?php foreach($this->data["result"] as $number => $value){
															echo "<option value='".$value["line_id"]."'>".$value["line_name"]."</option>";
														}
														?>
													</select> 
												</div>
											</div>
											-->
											<div class="col-xs-12"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <textarea class="form-control qtLe" name="cust_bank_account" rows="3" placeholder="Tài khoản ngân hàng"></textarea>
                                                    <li class="qt-money qttexta">&nbsp;</li>
                                                    </div> 
												</div>										
											</div>

										</form>
								</div>
							</section>

						</div>
						<div class="col-md-6"> 
							<section class="panel panel-default">
								<header class="panel-heading font-bold" style="background: #bcbcbc; height: 30px; font-size: 16px; padding: 5px;">
                                <li class="qt-user" style="list-style: none; float: left;">&nbsp;</li>
                                Thông tin doanh nghiệp</header>
								<div class="panel-body" style="border: 1px solid #bcbcbc; border-top: none;">
									<form role="form" class="form-horizontal">
										<div class="form-group" style="margin-top: 10px !important;"> 
											<div class="col-xs-12"> 
												<div class="col-lg-12"  style="padding:0px;">
                                                    <input  type="text" class="form-control qtLe" placeholder="Nhập tên doanh nghiệp" name="comp_name">
                                                    <li class="qt-sao" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                </div> 
											</div>										
										</div>
										<div class="form-group" style="margin-top: 10px !important;"> 
											<div class="col-xs-12"> 
												<div class="col-lg-12"  style="padding:0px;">
                                                <input type="text" class="form-control qtLe" placeholder="Địa chỉ" name="comp_address">
                                                <li class="qt-mp" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                </div> 
											</div>										
										</div>
										<div class="form-group" style="margin-top: 10px !important;"> 
											<div class="col-xs-6"> 
												<div class="col-lg-12"  style="padding:0px;">
                                                <input type="text" class="form-control qtLe" placeholder="Số điện thoại" name="comp_phone">
                                                <li class="qt-phone" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                </div>
                                                 
											</div>
											<div class="col-xs-6">  
												<div class="col-lg-12"  style="padding:0px;">
                                                <input  type="text" class="form-control qtLe" placeholder="Mã số thuế" name="comp_tax_code">
                                                <li class="qt-ms" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                </div> 
											</div>
										</div>
										<div class="form-group" style="margin-top: 10px !important;"> 
											<div class="col-xs-12"> 
												<div class="col-lg-12"  style="padding:0px;">
                                                <textarea class="form-control qtLe" name="comp_bank_account" rows="10" placeholder="Tài khoản ngân hàng"></textarea>
                                                <li class="qt-money qttexta">&nbsp;</li>
                                                </div> 
											</div>										
										</div>
									</form>
								</div>
							</section>
						</div>
						</div>
                            <div class="col-lg-offset-0 col-lg-12" style="width: 60%;
                                                                          position: absolute;
                                                                          bottom: -14px;
                                                                          left: 31%;">
					        <button style="width: 30%;" class="btn btn-primary btn-block" onclick="insertComp()">Đồng ý</button>
                            <button style="width: 30%; background: #bcbcbc !important;" class="btn btn-primary">Hủy</button>
					    </div>
                        </section>
					</div> <!-- END COMPANY FORM -->



					<!-- START CUSTOMER FORM -->
					<div class="customer-form" style="margin-top: 40px;">
						<div class="<?php if(!isset($_REQUEST["timeline"])){ echo "col-md-8 col-md-offset-2"; }else{ echo "col-md-12 col-md-offset-0"; }?>">				
							<div class="col-lg-12"> 
								<section class="panel panel-default">
									<header class="panel-heading font-bold"
                                    style="background: black;
                                           color: #ff6700;
                                           font-size: 17px;
                                           text-align: center;
                                           font-weight: normal;
                                           width: 60%;
                                           height: 30px;
                                           position: absolute;
                                           left: 20%;
                                           top: -15px;
                                           padding-top: 6px;">
                                           Khách hàng cá nhân</header>
									<div class="panel-body" style="border: 1px solid black;">
										<form role="form" class="form-horizontal">
											<div class="form-group"  style="margin-top: 10px !important;"> 
												<div class="col-xs-6">
													<div class="col-lg-12"  style="padding:0px;" >
														<select   class="cust_sex form-control qtLe" name="cust_sex">
															<option value="Mr">Mr.</option>
															<option value="Ms">Ms.</option>
														</select>
                                                        <li class="qt-mr" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
													</div>											
												</div>															
											</div>


											<div class="form-group" style="margin-top: 10px !important;"> 
												<div class="col-xs-6"> 
													<div class="col-lg-12" style="padding:0px;">
                                                    <input class="form-control qtLe qtLe" type="text" placeholder="Họ khách hàng" name="cust_first_name">
                                                    <li class="qt-sao" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div> 
												</div>
												<div class="col-xs-6"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <input type="text" class="form-control qtLe" placeholder="Tên khách hàng" name="cust_last_name">
                                                    <li class="qt-sao1" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div>
												</div>
											</div>

											<div class="form-group" style="margin-top: 10px !important;"> 
												<div class="col-xs-6"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <input type="text" 
                                                    readonly="false" class="form-control qtLe datepicker-input" placeholder="Ngày tháng năm sinh" 
                                                    name="cust_dob" data-date-format="dd-mm-yyyy">
                                                    <li class="qt-time1" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div>
                                                     
												</div>
												<div class="col-xs-6"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <input  type="text" class="form-control qtLe" placeholder="Số điện thoại" name="cust_phone">
                                                    <li class="qt-phone" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div> 
												</div>
											</div>
											<div class="form-group"  style="margin-top: 10px !important;"> 
												<div class="col-xs-12"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <input type="text" class="form-control qtLe" placeholder="Địa chỉ" name="cust_address">
                                                    <li class="qt-mp" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div> 
												</div>

											</div>
											<div class="form-group" style="margin-top: 10px !important;"> 
												<div class="col-xs-6"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <input type="text" class="form-control qtLe" placeholder="Mã số thuế cá nhân" name="cust_tax_code">
                                                    <li class="qt-ms" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div> 
												</div>
												<div class="col-xs-6"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <input type="text" class="form-control qtLe" placeholder="Email" name="cust_email">
                                                    <li class="qt-email" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div> 
												</div>
											</div>

											<div class="form-group"  style="margin-top: 10px !important;"> 
												<div class="col-xs-6"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <input type="text" class="form-control qtLe" placeholder="CMND" name="cust_cmnd">
                                                    <li class="qt-cmnd" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div> 
												</div>
												<div class="col-xs-6"> 
													<div class="col-lg-12" style="padding:0px;">
                                                    <input type="text" class="form-control qtLe datepicker-input" placeholder="Ngày cấp cmnd" name="cust_cmnd_date" data-date-format="dd-mm-yyyy">
                                                    <li class="qt-time1" style="list-style: none; position: absolute; left: 10px; top: 10px; font-size: 15px;">&nbsp;</li>
                                                    </div> 
												</div>
											</div>
											<div class="form-group"  style="margin-top: 10px !important;"> 
											<!--
												<div class="col-xs-6"> 
												<label class="col-lg-12">Ngành hàng:</label> 
												<div class="col-lg-12">
													<select multiple="" style="height: 75px" class="form-control qtLe" name="finance_lines">
														<?php foreach($this->data["result"] as $number => $value){
															echo "<option value='".$value["line_id"]."'>".$value["line_name"]."</option>";
														}
														?>
													</select> 
												</div>
											</div>
											-->
											<div class="col-xs-12"> 
													<div class="col-lg-12"  style="padding:0px;">
                                                    <textarea class="form-control qtLe" name="cust_bank_account" rows="3" placeholder="Tài khoản ngân hàng"></textarea>
                                                    <li class="qt-money qttexta">&nbsp;</li>
                                                    </div> 
												</div>										
											</div>

										</form>
									</div>
								</section>
							</div>
							<div class="col-lg-offset-0 col-lg-12" style="width: 70%;
                                                                          position: absolute;
                                                                          bottom: 7px;
                                                                          left: 20%;">
					        <button style="width: 40%;" class="btn btn-primary btn-block" onclick="insertCust()">Đồng ý</button>
                            <button style="width: 40%; background: #bcbcbc !important;" class="btn btn-primary">Hủy</button>
					    </div>
						</div>	
					</div> <!-- END CUSTOMER FORM -->					
				</div>
				<?php if(!isset($_REQUEST["timeline"])){?>
			</section>
		</div>
	</section>
</section>
<?php }?>

</div>
<div class="content-wrap" id="show-content2"></div>
<div class="content-wrap">  
<?php $this->load->view('qt/footer',null,false,true); ?>
